// Algunos prototipos de instaladores.
// No nos ha dado tiempo a terminarlos.
// Ya volveremos a la carga... :-)

// Simple Install programm Prototype written in Clipper + FiveWin

#include "FiveWin.ch"

//----------------------------------------------------------------------------//

function Main()

   local cSrcPath := "A:\"
   local cDstPath := "C:\FIVETEST\"

   if ! File( "Install.dbf" )
      DbCreate( "Install.dbf", { { "SOURCEFILE", "C", 50, 0 },;
                                 { "DESTINFILE", "C", 50, 0 },;
                                 { "EXPANDSIZE", "N",  8, 0 } } )
      MsgAlert( "Install.dbf was missing" + Chr( 13 ) + ;
               "A new one has been created" + Chr( 13 ) + ;
               "Please fill it with Files to install information",;
               "Instalation Error" )
      return
   endif

   if ! File( cDstPath )
      lMkDir( cDstPath )
      lMkDir( cDstPath + "\lib" )
      lMkDir( cDstPath + "\source" )
      lMkDir( cDstPath + "\examples" )
      lMkDir( cDstPath + "\doc" )
      lMkDir( cDstPath + "\dll" )
   endif

   USE Install
   while ! EoF()
      LZCopyFile( cSrcPath + AllTrim( SourceFile ),;
                  cDstPath + AllTrim( DestinFile ) )
      SKIP
   end
   USE

   nMsgBox( "Instalation complete!" )

return

//----------------------------------------------------------------------------//
